TypeScript still complaining after checking whether ref is a function

welcome to shbcf.ru